﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EBA.IoC
{
    public interface ILifetimeManager
    {
        object GetInstance(Type hostType,Type instanceType);
        object GetInstance(Type hostType, Type instanceType, string contractName);

        void RegisterInstance(Type hostType, Type instanceType, object instance);
        void RegisterInstance(Type hostType, Type instanceType, string contractName, object instance);

        void RegisterFactory<THostType,TInstanceType>(Func<object> factory);
        void RegisterFactory<THostType, TInstanceType>(string contactName, Func<string, object> factory);
    }
}
